Skip to content

Conversation

@devnexen
Copy link
Member

No description provided.

smart_str_free(&eval_buf);
zval_ptr_dtor(&retval);
} else {
if (!EG(exception)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this code is even unreachable. zend_call_function only returns FAILURE when !EG(active), which should not be possible to hit from here. And retval is only UNDEF if an exception did happen.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After double checking I think I'm right. You can drop this else branch in master.

@devnexen devnexen force-pushed the onig_free_my_region branch from c8028af to d84273a Compare May 25, 2025 09:05
@devnexen devnexen changed the base branch from PHP-8.3 to master May 25, 2025 09:05
@devnexen devnexen merged commit 16e154a into php:master May 25, 2025
10 checks passed
@devnexen devnexen deleted the onig_free_my_region branch May 25, 2025 09:45
if (zend_call_function(&arg_replace_fci, &arg_replace_fci_cache) == SUCCESS &&
!Z_ISUNDEF(retval)) {
convert_to_string(&retval);
smart_str_appendl(&out_buf, Z_STRVAL(retval), Z_STRLEN(retval));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticing this, but this could just be smart_str_append()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants